<?php

use think\facade\Route;

// 手机端路由
Route::group('index', function () {
    Route::get('pay', 'parking/mobile.Index/pay');
    Route::post('calculate_fee', 'parking/mobile.Index/calculateFee');
});

// 管理端路由
Route::group('admin', function () {
    Route::get('company/index', 'parking/admin.Company/index');
    Route::get('company/get', 'parking/admin.Company/get');
    Route::get('company/add', 'parking/admin.Company/add');
    Route::post('company/save', 'parking/admin.Company/save');
    Route::get('company/edit', 'parking/admin.Company/edit');
    Route::post('company/update', 'parking/admin.Company/update');
    Route::post('company/delete', 'parking/admin.Company/delete');

    Route::get('employee/index', 'parking/admin.Employee/index');
    Route::get('employee/get', 'parking/admin.Employee/get');
    Route::get('employee/add', 'parking/admin.Employee/add');
    Route::post('employee/save', 'parking/admin.Employee/save');
    Route::get('employee/edit', 'parking/admin.Employee/edit');
    Route::post('employee/update', 'parking/admin.Employee/update');
    Route::post('employee/delete', 'parking/admin.Employee/delete');

    Route::get('parking/index', 'parking/admin.Parking/index');
    Route::get('parking/get', 'parking/admin.Parking/get');
    Route::get('parking/add', 'parking/admin.Parking/add');
    Route::post('parking/save', 'parking/admin.Parking/save');
    Route::get('parking/edit', 'parking/admin.Parking/edit');
    Route::post('parking/update', 'parking/admin.Parking/update');
    Route::post('parking/delete', 'parking/admin.Parking/delete');

    Route::get('visitor/index', 'parking/admin.Visitor/index');
    Route::get('visitor/get', 'parking/admin.Visitor/get');
    Route::get('visitor/add', 'parking/admin.Visitor/add');
    Route::get('visitor/confirm', 'parking/admin.Visitor/confirm');
    Route::post('visitor/save', 'parking/admin.Visitor/save');
    Route::get('visitor/edit', 'parking/admin.Visitor/edit');
    Route::post('visitor/update', 'parking/admin.Visitor/update');
    Route::post('visitor/delete', 'parking/admin.Visitor.delete');
});
